 <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td bgcolor="#cccccc" width="200" valign="top"><!-- variable RHS Menu -->
     	<?php require('templates/menu7.php');?>
 
				</td>
<td valign="top" style="padding:30px 30px 30px 30px;">
<!--content-->



<?php
if(!isset($_REQUEST['id'])){
?>
<table border="0" width="100%" align="center">
<tr>
  <td><img src="heading/User-Details_03.jpg" /></td>
</tr>
<tr>
   <td>&nbsp;</td>
</tr>   
<tr>
	<td>
		<b><div id="resultshere1" class="errorText">
		<?php
	 if($_REQUEST['v']=='success')
	{
	echo 'Your Request has been submitted';
	}
	 ?>
	 <?php
	 if($_REQUEST['v']=='err')
	{
	echo 'Please Select the record';
	}
	 ?>
		</div>
		</b>
		</td>
	</tr>
<tr>
<td align="center"><?php echo GetUserDetailsGrid();?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>


<tr>
<td>&nbsp;</td>
</tr>

</table>
<?php }
else{
$sql = mysql_query('SELECT DISTINCT usr.user_id,usr.user_firstname,usr.user_lastname,usr.user_name,usr.user_password,usr.user_designation,usr.depot,lpt.division,lpt.region,lpt.dispatch_location,lpt.dispatch_date FROM users as usr LEFT JOIN  laptop as lpt ON  usr.user_id = lpt.user_id where usr.user_groups_id!="1" and usr.user_id="'.$_REQUEST['id'].'" ORDER BY  usr.user_no  Asc');

$result = mysql_fetch_row($sql);
 ?>
 <form name="frmRegistration" id="frmRegistration" method="post" action="user_details_process.php">
 <input type="hidden" name="user_id" value="<?php echo $result[0];?>" />
		  <table class="grid" border="0">
		   <tr>
			  <td colspan="3"  height="10"></td>
			  </tr>
                <tr>
                <td><b>Employee First Name</b></td>
                <td>:</td>
                <td><input type="text" name="emp_fname" id="emp_fname" value="<?php echo $result[1];?>" size="20"></td>
              </tr>
			   <tr>
                <td><b>Employee Last Name</b></td>
                <td>:</td>
                <td><input type="text" name="emp_lname" id="emp_lname" value="<?php echo $result[2];?>" size="20"></td>
              </tr>
			  <tr>
                <td><b>User Name</b></td>
                <td>:</td>
                <td><input type="text" name="user_name" id="user_name" value="<?php echo $result[3];?>" size="20"></td>
              </tr>
			  <tr>
                <td><b>Password</b></td>
                <td>:</td>
                <td><input type="text" name="password" id="password" value="<?php echo $result[4];?>" size="20"></td>
              </tr>
  			   <tr>
                <td><b>Employee Designation</b></td>
                <td>:</td>
                <td><?php echo GetEmpDesignationName($result[5]);?></td>
              </tr>
			  <tr>
                <td><b>Depot</b></td>
                <!--php code here -->
                <td>:</td>
                <td><?php echo GetDepot($result[6]);?>
                </td>
              </tr>
			   <tr>
                <td><b>Division</b></td>
                <td>:</td>
                <td><?php echo GetDivisionName($result[7]);?></td>
              </tr>
			    
              <tr>
                <td><b>Region</b></td>
                <td>:</td>
                <td><input type="text" name="region" id="region" value="<?php echo $result[8];?>" size="20"></td>
              </tr>
			 
			   <tr>
                <td><b>Dispatch Location</b></td>
                <td>:</td>
                <td><input type="text" name="dispatch_location" id="dispatch_location" value="<?php echo $result[9];?>" size="20"></td>
              </tr>
			  
			   <tr>
                <td><b>Dispatch Date</b></td>
                <td>:</td>
                <td><input  type="text" id="doc3" name="doc3" value="<?php echo $result[10];?>" readonly="readonly" size="15"/>
                  &nbsp;<img src="images/icon_calendar.png" id="icon_calendar1" width="20" height="17" alt="Calendar" border="0" align="absmiddle" onMouseOver="CalCalender('doc3','icon_calendar1')" /> &nbsp;<small>(dd-mm-yyyy)</small>&nbsp;&nbsp;</td>
              </tr>
			  <tr>
			  <td colspan="3"  height="20"></td>
			  </tr>
              <tr>
                <td colspan="3" align="center">
				<input type="hidden" name="PageName" value="<?php echo $_SERVER['REQUEST_URI'];?>" />
				<input type="submit" value="Submit" name="submit" onClick="return Validate_Registration('frmRegistration');"></td>
              </tr>
			  <tr>
			  <td colspan="3"  height="20"></td>
			  </tr>
            </table>
			</form> 
 
 
 
 
<?php } ?>
    <!--end content-->
    </td>
	</tr>
  </table>
  </td>
  </tr>
</table>
